package com.android.job.logic;

import android.os.Handler;

import com.android.job.fusion.FusionCode;
import com.android.job.service.Request;
import com.android.job.service.request.RegisterRequest;

/**
 * 注册
 * 
 */
public class RegisterLogic
{

	private static RegisterLogic instance;

	private final static String URL = "http://192.168.10.221:8080/employment/protocol.do";

	private RegisterLogic()
	{

	}

	public synchronized static RegisterLogic getInstance()
	{
		if (instance == null)
		{
			instance = new RegisterLogic();
		}
		return instance;
	}

	public Request register(Handler handler, 
			String userPassword, String name, String gender, String identity,
			String mobileNumber, String degree, String categories,
			String political, String salary, String region, String type,
			String nature, String census, String marital, String mailingAddress,
			String homeAddress,
			String qq, String email, String msn, String recentType,
			String recentYear)
	{
		RegisterRequest register = new RegisterRequest(handler, FusionCode.URL);
		register.setValues( userPassword, name, gender, identity,
				mobileNumber, degree, categories, political, salary, region,
				type, nature, census, marital, mailingAddress, 
				homeAddress, qq, email, msn, recentType, recentYear);
		register.getJSONResponse();

		return register;
	}

}
